import { Button } from "antd";
import { useHistory } from "react-router-dom";
const GoToNewsList = (props) =>
{
    const history = useHistory();
    function handleClick()
    {
        history.push(props.to)
    }
    return (
        <Button onClick={handleClick}>{props.to}</Button>
    )
}

export default GoToNewsList;
